<?php
function smarty_function_blog_username($params, &$smarty)
{
	$intUserId 		= isset($params['userid']) ? $params['userid'] : 0;	
	$objVfriendUser	= new Vfriend_User();
	$objUser		= $objVfriendUser->getFull($intUserId);	
	if($objUser->username) {
		return HOST_BLOG . $objUser->username;
	} else {
		return Vfriend_Function::linkBlogForUsername($objUser->hex, $objUser->fullnamevn);
	}
}
?>